package com.zhiche.lisa.bms.service.driver;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.zhiche.lisa.bms.dao.model.driver.PertrolPriceEffective;
import com.zhiche.lisa.bms.pojo.vo.driver.PertrolPriceEffectiveVO;
import org.springframework.validation.BindingResult;

import java.util.Date;

/**
 * <p>
 * 加油站燃油价格生效表 服务类
 * </p>
 *
 * @author linbao
 * @since 2019-02-28
 */
public interface PertrolPriceEffectiveService extends IService<PertrolPriceEffective> {

    /**
     * 分页查询
     *
     * @param page
     * @return
     */
    Page<PertrolPriceEffectiveVO> queryPertrolPricePage(Page<PertrolPriceEffectiveVO> page);

    /**
     * 添加
     *
     * @param pertrolPriceEffectiveVO
     * @param br
     * @return
     */
    void addPertrolPrice(PertrolPriceEffectiveVO pertrolPriceEffectiveVO, BindingResult br);

    /**
     * 根据燃油类型得到最新的燃油价格
     *
     * @param fuelTypeId
     * @param effectiveDate
     * @return
     */
    PertrolPriceEffective selectByEffectiveDateAndFuelTypeId(Integer fuelTypeId, Date effectiveDate);
}
